<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: red;
            /*设置圆角边框*/
            /*border-radius: 50%;*/
            /*将动画设置给div*/
            animation-name: move;
            /*设置动画持续时长*/
            animation-duration: 2s;
            /*设置动画速度曲线*/
            animation-timing-function: linear;
            /*设置动画执行次数 infinite一直重复执行 n(1) */
            animation-iteration-count: infinite;
            /*设置动画反向执行*/
            animation-direction: alternate;
        }
        /*定义动画关键帧*/
        @keyframes move {
           
            0%{
                transform: translateX(0px) rotate(0deg) ;
            }
            25%{
                transform: translateX(50px) rotate(90deg);
                border-radius: 10px;
                background-color: green;
            }
             50%{
                transform: translateX(100px) rotate(180deg);
                border-radius: 20px;
                background-color: pink;
            }
             75%{
                transform: translateX(150px) rotate(270deg);
                border-radius: 35px;
                background-color: blueviolet;
            }
             100%{
                transform: translateX(200px) rotate(360deg);
                border-radius: 50px;
                background-color: yellow;
            }
        }
        /*定义一个心跳动画*/
        /* @keyframes pound {
            from{
                transform: none;
            }
            to{
                transform: scale(1.2);
            }
            
        } */
        img{
            animation: pound .2s linear infinite alternate;
        }
    </style>
</head>
<body>
    <div></div>
    <img width="200px" src="../音视频/1.webp" alt="">
</body>
</html>